import request from "@/utils/request";

//获取帮助中心tree列表
export const getTreeList = props => {
  return request({
    url: "/mall/help/getList",
    method: "get",
    params: props
  });
};

//根据id获取帮助中心详情
export const getHelpDetail = props => {
  return request({
    url: `/mall/help/getHelpDetail/${props.id}`,
    method: "get",
    params: props
  });
};

//新增
export const addHelp = props => {
  return request({
    url: "/mall/help/add",
    method: "post",
    data: props
  });
};

//修改
export const editHelp = props => {
  return request({
    url: `/mall/help/updateHelp/${props.id}`,
    method: "post",
    data: props
  });
};

//删除
export const delHelp = props => {
  return request({
    url: `/mall/help/delete/${props.id}`,
    method: "post"
  });
};

//拖拽排序
export const updateSort = props => {
  return request({
    url: "/mall/help/updateSort",
    method: "post",
    data: props
  });
};
